import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { RoleEntity } from '../../entities/role.entity';

@Injectable()
export class RoleService {
    constructor(
        @InjectRepository(RoleEntity, 'nest_test2')
        private readonly roleRepository: Repository<RoleEntity>,
      ) {}
      async roleList(): Promise<any> {
        return await this.roleRepository.find();
      }
}
